<?php


namespace App\Validate\Admin;


use App\Http\Request;

class RefundAddress extends Request
{
    /**
     * 验证规则
     */
    protected $rule = [
        'address_id' => 'required|numeric',
        'contacts' => 'required',
        'mobile' => 'required|numeric',
        'province' => 'required',
        'city' => 'required',
        'area' => 'required',
        'address' => 'required'
    ];

    /**
     * 提示消息
     */
    protected $message = [
        'address_id.required' => '请选择地址',
        'contacts.required' => '请输入收货人',
        'mobile.required' => '请输入手机号',
        'province.required' => '请选择省份',
        'city.required' => '请选择城市',
        'area.required' => '请选择区域',
        'address.required' => '请输入详细地址'
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'add_refund_address' => ['contacts', 'mobile', 'province', 'city', 'area', 'address'],
        'edit_refund_address' => ['address_id', 'contacts', 'mobile', 'province', 'city', 'area', 'address'],
    ];
}
